<template>
  <div>
    <h1>购物车买东西</h1>
    <ul>
      <li>
        <router-link :to="{ name: 'goodslist' }">商品列表</router-link>
      </li>
      <li>
        <router-link :to="{ name: 'jiesuan' }">结算</router-link>
      </li>
    </ul>
    <router-view :list="list"></router-view>
  </div>
</template>

<script>
/* 
路由组件传参的方式？
query params vuex
props localStorage sessionStorage cookies


*/
export default {
  name: "CartPage",
  data() {
    return {
      list: [
        {
          id: 1,
          name: "鸡蛋",
        },
        {
          id: 2,
          name: "鸭蛋",
        },
      ],
    };
  },
};
</script>

<style lang="scss" scoped>
</style>